import java.util.*;

/**
 * Created by lj on 2016/8/3.
 */
public class MaxHeap<T extends Comparable<T>> {

    private T[] array;
    private int setSize;
    private int size;
    private static int maxSize = 10000000;

    public MaxHeap(){
        this(maxSize);
    }

    public MaxHeap(int setSize){
        this.setSize = setSize;
        array = (T[])new Object[size];
    }

    public void buildHeap(T... list) {
        for(T object :list){
            array[size++] = object;
        }
    }

    public void add() {
    }
    public void get() {

    }

    private void maxHeapify(int cur){
        if(cur>=size) return;
        int left = cur*2+1, right = cur*2 + 2;
        if(array[cur].compareTo(array[left])<0){

        }

    }

    private  void swap (Object a, Object b){
        Object tmp = a;
        a = b;
        b = tmp;
    }
}
